<template>
  <div class="detail" v-if="data">
    <!-- 头部带返回按钮 -->
    <div align="left">
      <span>xlp:</span>{{ data.xlp }}
    </div>
    <div align="left">
      <span>xlm:</span>{{ data.xlm }}
    </div>
    <div align="left">
      <span>诊断序号:</span>{{ data.zdxh }}
    </div>
    <div align="left">
      <span>诊断编码:</span>{{ data.zdbm }}
    </div>
    <div align="left">
      <span>诊断名称:</span>{{ data.zdmc }}
    </div>
  </div>
</template>

<script>
import {Button, Spin, Descriptions, Tag, Empty, Icon, Layout, Menu, Dropdown, Avatar} from 'ant-design-vue';
import {zyzd, zzqs} from "../api/jzsj";

export default {
  name: 'ZYZD',
  components: {
    'a-layout': Layout,
    'a-layout-sider': Layout.Sider,
    'a-layout-header': Layout.Header,
    'a-layout-content': Layout.Content,
    'a-layout-footer': Layout.Footer,
    'a-menu': Menu,
    'a-menu-item': Menu.Item,
    'a-sub-menu': Menu.SubMenu,
    'a-menu-divider': Menu.Divider,
    'a-button': Button,
    'a-icon': Icon,
    'a-dropdown': Dropdown,
    'a-avatar': Avatar
  },
  data() {
    return {
      data: null
    }
  },
  mounted() {
    const id = this.$route.query.id;
    console.info("id" + id)
    this.zyzdFun(id);
  },
  methods: {
    async zyzdFun(patientId) {
      console.info(this.patientId)
      // 显示加载状态
      this.loading = true;
      let params = {
        patientId: patientId
      };
      let res = await zyzd(params);
      if (res.status === 0) {
        this.data = res.data;
      }
      this.loading = false;
    },
  }
}

</script>

<style>
.detail {
  padding: 20px;
  background-color: #fff;
  min-height: 100px;
}

#components-layout-demo-custom-trigger {
  height: 100vh;
}

.detail-layout-header {
  background: #fff;
  padding: 0 20px;
  align: "left";
}

.trigger {
  font-size: 18px;
  line-height: 64px;
  padding: 0 24px;
  cursor: pointer;
  transition: color 0.3s;
}

.trigger:hover {
  color: #1890ff;
}

.detail-layout-content {
  margin: 24px 16px;
  padding: 24px;
  background: #fff;
  min-height: calc(100vh - 130px);
}

.sider {
  transition: all 0.3s;
}

.detail-header {
  margin: 0 0 0 0;
}
</style>
